package com.shangcheng.server.controller;

import com.shangcheng.model.domain.OmsCompanyAddress;
import com.shangcheng.model.vo.result.Result;
import com.shangcheng.server.service.OmsCompanyAddressService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author JavaClimber
 * @version 1.0
 * @date 2022/5/13 0013 zihao
 */
//获取所有收货地址
@RestController
@RequestMapping("/companyAddress")
public class OmsCompanyAddressController {

    @Autowired
    private OmsCompanyAddressService omsCompanyAddressService;

    @GetMapping("/list")
    public ResponseEntity lists() {
        List<OmsCompanyAddress> lists =  omsCompanyAddressService.lists();
        return ResponseEntity.ok(new Result(200, lists, "成功"));
    }

}
